import React, { useEffect } from "react";
import { Button } from '@wecode/react-weui';

export default function NavigateTo2(props) {

    const { history, location, match } = props;
    const { params } = match;
    console.log('获取URL id 参数值：', params);
    const { customData } = location; // 获取上个页面传的值

    useEffect(()=>{
        HWH5.navTitle({ title: "内部页面" });
    }, []);

    return (
        <React.Fragment>
            <p style={{ padding: '30px 20px 0'}}>
                页面接收到的数据：
                <code>
                {JSON.stringify(customData)}
                </code>
            </p>
            <Button type="primary" size="middle" onClick={() => history.goBack()}>
                返回
            </Button>
        </React.Fragment>
    )
}